<?php
if (session_id() == "") session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg10.php" ?>
<?php include_once "ewmysql10.php" ?>
<?php include_once "phpfn10.php" ?>
<?php include_once "presu_presupuestosinfo.php" ?>
<?php include_once "usuariosinfo.php" ?>
<?php include_once "userfn10.php" ?>
<?php

//
// Page class
//

$presu_presupuestos_view = NULL; // Initialize page object first

class cpresu_presupuestos_view extends cpresu_presupuestos {

	// Page ID
	var $PageID = 'view';

	// Project ID
	var $ProjectID = "{439DA749-8B4B-4158-860B-2E007EBCC6EC}";

	// Table name
	var $TableName = 'presu_presupuestos';

	// Page object name
	var $PageObjName = 'presu_presupuestos_view';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		if ($this->UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Page URLs
	var $AddUrl;
	var $EditUrl;
	var $CopyUrl;
	var $DeleteUrl;
	var $ViewUrl;
	var $ListUrl;

	// Export URLs
	var $ExportPrintUrl;
	var $ExportHtmlUrl;
	var $ExportExcelUrl;
	var $ExportWordUrl;
	var $ExportXmlUrl;
	var $ExportCsvUrl;
	var $ExportPdfUrl;

	// Update URLs
	var $InlineAddUrl;
	var $InlineCopyUrl;
	var $InlineEditUrl;
	var $GridAddUrl;
	var $GridEditUrl;
	var $MultiDeleteUrl;
	var $MultiUpdateUrl;

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v);
	}

	function getFailureMessage() {
		return @$_SESSION[EW_SESSION_FAILURE_MESSAGE];
	}

	function setFailureMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v);
	}

	function getSuccessMessage() {
		return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE];
	}

	function setSuccessMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
	}

	function getWarningMessage() {
		return @$_SESSION[EW_SESSION_WARNING_MESSAGE];
	}

	function setWarningMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
	}

	// Show message
	function ShowMessage() {
		$hidden = FALSE;
		$html = "";

		// Message
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage, "");
		if ($sMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sMessage . "</div>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}

		// Warning message
		$sWarningMessage = $this->getWarningMessage();
		$this->Message_Showing($sWarningMessage, "warning");
		if ($sWarningMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sWarningMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sWarningMessage;
			$html .= "<div class=\"alert alert-warning ewWarning\">" . $sWarningMessage . "</div>";
			$_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session
		}

		// Success message
		$sSuccessMessage = $this->getSuccessMessage();
		$this->Message_Showing($sSuccessMessage, "success");
		if ($sSuccessMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sSuccessMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sSuccessMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sSuccessMessage . "</div>";
			$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session
		}

		// Failure message
		$sErrorMessage = $this->getFailureMessage();
		$this->Message_Showing($sErrorMessage, "failure");
		if ($sErrorMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sErrorMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sErrorMessage;
			$html .= "<div class=\"alert alert-error ewError\">" . $sErrorMessage . "</div>";
			$_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session
		}
		echo "<table class=\"ewStdTable\"><tr><td><div class=\"ewMessageDialog\"" . (($hidden) ? " style=\"display: none;\"" : "") . ">" . $html . "</div></td></tr></table>";
	}
	var $PageHeader;
	var $PageFooter;

	// Show Page Header
	function ShowPageHeader() {
		$sHeader = $this->PageHeader;
		$this->Page_DataRendering($sHeader);
		if ($sHeader <> "") { // Header exists, display
			echo "<p>" . $sHeader . "</p>";
		}
	}

	// Show Page Footer
	function ShowPageFooter() {
		$sFooter = $this->PageFooter;
		$this->Page_DataRendered($sFooter);
		if ($sFooter <> "") { // Footer exists, display
			echo "<p>" . $sFooter . "</p>";
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm;
		if ($this->UseTokenInUrl) {
			if ($objForm)
				return ($this->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($this->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;
		$GLOBALS["Page"] = &$this;

		// Language object
		if (!isset($Language)) $Language = new cLanguage();

		// Parent constuctor
		parent::__construct();

		// Table object (presu_presupuestos)
		if (!isset($GLOBALS["presu_presupuestos"]) || get_class($GLOBALS["presu_presupuestos"]) == "cpresu_presupuestos") {
			$GLOBALS["presu_presupuestos"] = &$this;
			$GLOBALS["Table"] = &$GLOBALS["presu_presupuestos"];
		}
		$KeyUrl = "";
		if (@$_GET["PresuId"] <> "") {
			$this->RecKey["PresuId"] = $_GET["PresuId"];
			$KeyUrl .= "&amp;PresuId=" . urlencode($this->RecKey["PresuId"]);
		}
		$this->ExportPrintUrl = $this->PageUrl() . "export=print" . $KeyUrl;
		$this->ExportHtmlUrl = $this->PageUrl() . "export=html" . $KeyUrl;
		$this->ExportExcelUrl = $this->PageUrl() . "export=excel" . $KeyUrl;
		$this->ExportWordUrl = $this->PageUrl() . "export=word" . $KeyUrl;
		$this->ExportXmlUrl = $this->PageUrl() . "export=xml" . $KeyUrl;
		$this->ExportCsvUrl = $this->PageUrl() . "export=csv" . $KeyUrl;
		$this->ExportPdfUrl = $this->PageUrl() . "export=pdf" . $KeyUrl;

		// Table object (usuarios)
		if (!isset($GLOBALS['usuarios'])) $GLOBALS['usuarios'] = new cusuarios();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'view', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'presu_presupuestos', TRUE);

		// Start timer
		if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer();

		// Open connection
		if (!isset($conn)) $conn = ew_Connect();

		// Export options
		$this->ExportOptions = new cListOptions();
		$this->ExportOptions->Tag = "div";
		$this->ExportOptions->TagClassName = "ewExportOption";

		// Other options
		$this->OtherOptions['action'] = new cListOptions();
		$this->OtherOptions['action']->Tag = "div";
		$this->OtherOptions['action']->TagClassName = "ewActionOption";
		$this->OtherOptions['detail'] = new cListOptions();
		$this->OtherOptions['detail']->Tag = "div";
		$this->OtherOptions['detail']->TagClassName = "ewDetailOption";
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		$this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up current action
		$this->PresuId->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();
		$this->Page_Redirecting($url);

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $ExportOptions; // Export options
	var $OtherOptions = array(); // Other options
	var $DisplayRecs = 1;
	var $StartRec;
	var $StopRec;
	var $TotalRecs = 0;
	var $RecRange = 10;
	var $RecCnt;
	var $RecKey = array();
	var $Recordset;

	//
	// Page main
	//
	function Page_Main() {
		global $Language;

		// Load current record
		$bLoadCurrentRecord = FALSE;
		$sReturnUrl = "";
		$bMatchRecord = FALSE;

		// Set up Breadcrumb
		if ($this->Export == "")
			$this->SetupBreadcrumb();
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET["PresuId"] <> "") {
				$this->PresuId->setQueryStringValue($_GET["PresuId"]);
				$this->RecKey["PresuId"] = $this->PresuId->QueryStringValue;
			} else {
				$sReturnUrl = "presu_presupuestoslist.php"; // Return to list
			}

			// Get action
			$this->CurrentAction = "I"; // Display form
			switch ($this->CurrentAction) {
				case "I": // Get a record to display
					if (!$this->LoadRow()) { // Load record based on key
						if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "")
							$this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message
						$sReturnUrl = "presu_presupuestoslist.php"; // No matching record, return to list
					}
			}
		} else {
			$sReturnUrl = "presu_presupuestoslist.php"; // Not page request, return to list
		}
		if ($sReturnUrl <> "")
			$this->Page_Terminate($sReturnUrl);

		// Render row
		$this->RowType = EW_ROWTYPE_VIEW;
		$this->ResetAttrs();
		$this->RenderRow();
	}

	// Set up other options
	function SetupOtherOptions() {
		global $Language, $Security;
		$options = &$this->OtherOptions;
		$option = &$options["action"];

		// Add
		$item = &$option->Add("add");
		$item->Body = "<a class=\"ewAction ewAdd\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("ViewPageAddLink") . "</a>";
		$item->Visible = ($this->AddUrl <> "" && $Security->IsLoggedIn());

		// Edit
		$item = &$option->Add("edit");
		$item->Body = "<a class=\"ewAction ewEdit\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
		$item->Visible = ($this->EditUrl <> "" && $Security->IsLoggedIn());

		// Copy
		$item = &$option->Add("copy");
		$item->Body = "<a class=\"ewAction ewCopy\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("ViewPageCopyLink") . "</a>";
		$item->Visible = ($this->CopyUrl <> "" && $Security->IsLoggedIn());

		// Delete
		$item = &$option->Add("delete");
		$item->Body = "<a class=\"ewAction ewDelete\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("ViewPageDeleteLink") . "</a>";
		$item->Visible = ($this->DeleteUrl <> "" && $Security->IsLoggedIn());

		// Set up options default
		foreach ($options as &$option) {
			$option->UseDropDownButton = FALSE;
			$option->UseButtonGroup = TRUE;
			$item = &$option->Add($option->GroupOptionName);
			$item->Body = "";
			$item->Visible = FALSE;
		}
		$options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
		$options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
	}

	// Set up starting record parameters
	function SetUpStartRec() {
		if ($this->DisplayRecs == 0)
			return;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
				$this->StartRec = $_GET[EW_TABLE_START_REC];
				$this->setStartRecordNumber($this->StartRec);
			} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
				$PageNo = $_GET[EW_TABLE_PAGE_NO];
				if (is_numeric($PageNo)) {
					$this->StartRec = ($PageNo-1)*$this->DisplayRecs+1;
					if ($this->StartRec <= 0) {
						$this->StartRec = 1;
					} elseif ($this->StartRec >= intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1) {
						$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1;
					}
					$this->setStartRecordNumber($this->StartRec);
				}
			}
		}
		$this->StartRec = $this->getStartRecordNumber();

		// Check if correct start record counter
		if (!is_numeric($this->StartRec) || $this->StartRec == "") { // Avoid invalid start record counter
			$this->StartRec = 1; // Reset start record counter
			$this->setStartRecordNumber($this->StartRec);
		} elseif (intval($this->StartRec) > intval($this->TotalRecs)) { // Avoid starting record > total records
			$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to last page first record
			$this->setStartRecordNumber($this->StartRec);
		} elseif (($this->StartRec-1) % $this->DisplayRecs <> 0) {
			$this->StartRec = intval(($this->StartRec-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to page boundary
			$this->setStartRecordNumber($this->StartRec);
		}
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $Language;
		$sFilter = $this->KeyFilter();

		// Call Row Selecting event
		$this->Row_Selecting($sFilter);

		// Load SQL based on filter
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn;
		if (!$rs || $rs->EOF) return;

		// Call Row Selected event
		$row = &$rs->fields;
		$this->Row_Selected($row);
		$this->PresuId->setDbValue($rs->fields('PresuId'));
		$this->PresuFechaCopia->setDbValue($rs->fields('PresuFechaCopia'));
		$this->PresuEstado->setDbValue($rs->fields('PresuEstado'));
		$this->PresuFacturaPto->setDbValue($rs->fields('PresuFacturaPto'));
		$this->PresuFacturoTipo->setDbValue($rs->fields('PresuFacturoTipo'));
		$this->PresuFacturaNumero->setDbValue($rs->fields('PresuFacturaNumero'));
		$this->PresuMotivo->setDbValue($rs->fields('PresuMotivo'));
		$this->PresFechaCierre->setDbValue($rs->fields('PresFechaCierre'));
		$this->PresuReemplazado->setDbValue($rs->fields('PresuReemplazado'));
		$this->PresuSucursal->setDbValue($rs->fields('PresuSucursal'));
		$this->PresuEmpresa->setDbValue($rs->fields('PresuEmpresa'));
		$this->PresuTip->setDbValue($rs->fields('PresuTip'));
		$this->PresuLet->setDbValue($rs->fields('PresuLet'));
		$this->PresuPun->setDbValue($rs->fields('PresuPun'));
		$this->PresuNum->setDbValue($rs->fields('PresuNum'));
		$this->PresuCli->setDbValue($rs->fields('PresuCli'));
		$this->PresuRaz->setDbValue($rs->fields('PresuRaz'));
		$this->PresuFec1->setDbValue($rs->fields('PresuFec1'));
		$this->PresuVen->setDbValue($rs->fields('PresuVen'));
		$this->PresuTot->setDbValue($rs->fields('PresuTot'));
		$this->PresuEntDir->setDbValue($rs->fields('PresuEntDir'));
		$this->PresuEntLoc->setDbValue($rs->fields('PresuEntLoc'));
		$this->PresuEntTel->setDbValue($rs->fields('PresuEntTel'));
		$this->PresuEntEmail->setDbValue($rs->fields('PresuEntEmail'));
		$this->PresuEntObs1->setDbValue($rs->fields('PresuEntObs1'));
		$this->PresuEntObs2->setDbValue($rs->fields('PresuEntObs2'));
		$this->PresuHor->setDbValue($rs->fields('PresuHor'));
		$this->PresuTipoCli->setDbValue($rs->fields('PresuTipoCli'));
		$this->PresuFechaUltimaGestion->setDbValue($rs->fields('PresuFechaUltimaGestion'));
		$this->PresuProximoContacto->setDbValue($rs->fields('PresuProximoContacto'));
	}

	// Load DbValue from recordset
	function LoadDbValues(&$rs) {
		if (!$rs || !is_array($rs) && $rs->EOF) return;
		$row = is_array($rs) ? $rs : $rs->fields;
		$this->PresuId->DbValue = $row['PresuId'];
		$this->PresuFechaCopia->DbValue = $row['PresuFechaCopia'];
		$this->PresuEstado->DbValue = $row['PresuEstado'];
		$this->PresuFacturaPto->DbValue = $row['PresuFacturaPto'];
		$this->PresuFacturoTipo->DbValue = $row['PresuFacturoTipo'];
		$this->PresuFacturaNumero->DbValue = $row['PresuFacturaNumero'];
		$this->PresuMotivo->DbValue = $row['PresuMotivo'];
		$this->PresFechaCierre->DbValue = $row['PresFechaCierre'];
		$this->PresuReemplazado->DbValue = $row['PresuReemplazado'];
		$this->PresuSucursal->DbValue = $row['PresuSucursal'];
		$this->PresuEmpresa->DbValue = $row['PresuEmpresa'];
		$this->PresuTip->DbValue = $row['PresuTip'];
		$this->PresuLet->DbValue = $row['PresuLet'];
		$this->PresuPun->DbValue = $row['PresuPun'];
		$this->PresuNum->DbValue = $row['PresuNum'];
		$this->PresuCli->DbValue = $row['PresuCli'];
		$this->PresuRaz->DbValue = $row['PresuRaz'];
		$this->PresuFec1->DbValue = $row['PresuFec1'];
		$this->PresuVen->DbValue = $row['PresuVen'];
		$this->PresuTot->DbValue = $row['PresuTot'];
		$this->PresuEntDir->DbValue = $row['PresuEntDir'];
		$this->PresuEntLoc->DbValue = $row['PresuEntLoc'];
		$this->PresuEntTel->DbValue = $row['PresuEntTel'];
		$this->PresuEntEmail->DbValue = $row['PresuEntEmail'];
		$this->PresuEntObs1->DbValue = $row['PresuEntObs1'];
		$this->PresuEntObs2->DbValue = $row['PresuEntObs2'];
		$this->PresuHor->DbValue = $row['PresuHor'];
		$this->PresuTipoCli->DbValue = $row['PresuTipoCli'];
		$this->PresuFechaUltimaGestion->DbValue = $row['PresuFechaUltimaGestion'];
		$this->PresuProximoContacto->DbValue = $row['PresuProximoContacto'];
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language;
		global $gsLanguage;

		// Initialize URLs
		$this->AddUrl = $this->GetAddUrl();
		$this->EditUrl = $this->GetEditUrl();
		$this->CopyUrl = $this->GetCopyUrl();
		$this->DeleteUrl = $this->GetDeleteUrl();
		$this->ListUrl = $this->GetListUrl();
		$this->SetupOtherOptions();

		// Convert decimal values if posted back
		if ($this->PresuTot->FormValue == $this->PresuTot->CurrentValue && is_numeric(ew_StrToFloat($this->PresuTot->CurrentValue)))
			$this->PresuTot->CurrentValue = ew_StrToFloat($this->PresuTot->CurrentValue);

		// Call Row_Rendering event
		$this->Row_Rendering();

		// Common render codes for all row types
		// PresuId
		// PresuFechaCopia
		// PresuEstado
		// PresuFacturaPto
		// PresuFacturoTipo
		// PresuFacturaNumero
		// PresuMotivo
		// PresFechaCierre
		// PresuReemplazado
		// PresuSucursal
		// PresuEmpresa
		// PresuTip
		// PresuLet
		// PresuPun
		// PresuNum
		// PresuCli
		// PresuRaz
		// PresuFec1
		// PresuVen
		// PresuTot
		// PresuEntDir
		// PresuEntLoc
		// PresuEntTel
		// PresuEntEmail
		// PresuEntObs1
		// PresuEntObs2
		// PresuHor
		// PresuTipoCli
		// PresuFechaUltimaGestion
		// PresuProximoContacto

		if ($this->RowType == EW_ROWTYPE_VIEW) { // View row

			// PresuId
			$this->PresuId->ViewValue = $this->PresuId->CurrentValue;
			$this->PresuId->ViewCustomAttributes = "";

			// PresuFechaCopia
			$this->PresuFechaCopia->ViewValue = $this->PresuFechaCopia->CurrentValue;
			$this->PresuFechaCopia->ViewValue = ew_FormatDateTime($this->PresuFechaCopia->ViewValue, 7);
			$this->PresuFechaCopia->ViewCustomAttributes = "";

			// PresuEstado
			$this->PresuEstado->ViewValue = $this->PresuEstado->CurrentValue;
			$this->PresuEstado->ViewCustomAttributes = "";

			// PresuFacturaPto
			$this->PresuFacturaPto->ViewValue = $this->PresuFacturaPto->CurrentValue;
			$this->PresuFacturaPto->ViewCustomAttributes = "";

			// PresuFacturoTipo
			$this->PresuFacturoTipo->ViewValue = $this->PresuFacturoTipo->CurrentValue;
			$this->PresuFacturoTipo->ViewCustomAttributes = "";

			// PresuFacturaNumero
			$this->PresuFacturaNumero->ViewValue = $this->PresuFacturaNumero->CurrentValue;
			$this->PresuFacturaNumero->ViewCustomAttributes = "";

			// PresuMotivo
			$this->PresuMotivo->ViewValue = $this->PresuMotivo->CurrentValue;
			$this->PresuMotivo->ViewCustomAttributes = "";

			// PresFechaCierre
			$this->PresFechaCierre->ViewValue = $this->PresFechaCierre->CurrentValue;
			$this->PresFechaCierre->ViewValue = ew_FormatDateTime($this->PresFechaCierre->ViewValue, 7);
			$this->PresFechaCierre->ViewCustomAttributes = "";

			// PresuReemplazado
			$this->PresuReemplazado->ViewValue = $this->PresuReemplazado->CurrentValue;
			$this->PresuReemplazado->ViewCustomAttributes = "";

			// PresuSucursal
			$this->PresuSucursal->ViewValue = $this->PresuSucursal->CurrentValue;
			$this->PresuSucursal->ViewCustomAttributes = "";

			// PresuEmpresa
			$this->PresuEmpresa->ViewValue = $this->PresuEmpresa->CurrentValue;
			$this->PresuEmpresa->ViewCustomAttributes = "";

			// PresuTip
			$this->PresuTip->ViewValue = $this->PresuTip->CurrentValue;
			$this->PresuTip->ViewCustomAttributes = "";

			// PresuLet
			$this->PresuLet->ViewValue = $this->PresuLet->CurrentValue;
			$this->PresuLet->ViewCustomAttributes = "";

			// PresuPun
			$this->PresuPun->ViewValue = $this->PresuPun->CurrentValue;
			$this->PresuPun->ViewCustomAttributes = "";

			// PresuNum
			$this->PresuNum->ViewValue = $this->PresuNum->CurrentValue;
			$this->PresuNum->ViewCustomAttributes = "";

			// PresuCli
			$this->PresuCli->ViewValue = $this->PresuCli->CurrentValue;
			$this->PresuCli->ViewCustomAttributes = "";

			// PresuRaz
			$this->PresuRaz->ViewValue = $this->PresuRaz->CurrentValue;
			$this->PresuRaz->ViewCustomAttributes = "";

			// PresuFec1
			$this->PresuFec1->ViewValue = $this->PresuFec1->CurrentValue;
			$this->PresuFec1->ViewValue = ew_FormatDateTime($this->PresuFec1->ViewValue, 7);
			$this->PresuFec1->ViewCustomAttributes = "";

			// PresuVen
			$this->PresuVen->ViewValue = $this->PresuVen->CurrentValue;
			$this->PresuVen->ViewCustomAttributes = "";

			// PresuTot
			$this->PresuTot->ViewValue = $this->PresuTot->CurrentValue;
			$this->PresuTot->ViewCustomAttributes = "";

			// PresuEntDir
			$this->PresuEntDir->ViewValue = $this->PresuEntDir->CurrentValue;
			$this->PresuEntDir->ViewCustomAttributes = "";

			// PresuEntLoc
			$this->PresuEntLoc->ViewValue = $this->PresuEntLoc->CurrentValue;
			$this->PresuEntLoc->ViewCustomAttributes = "";

			// PresuEntTel
			$this->PresuEntTel->ViewValue = $this->PresuEntTel->CurrentValue;
			$this->PresuEntTel->ViewCustomAttributes = "";

			// PresuEntEmail
			$this->PresuEntEmail->ViewValue = $this->PresuEntEmail->CurrentValue;
			$this->PresuEntEmail->ViewCustomAttributes = "";

			// PresuEntObs1
			$this->PresuEntObs1->ViewValue = $this->PresuEntObs1->CurrentValue;
			$this->PresuEntObs1->ViewCustomAttributes = "";

			// PresuEntObs2
			$this->PresuEntObs2->ViewValue = $this->PresuEntObs2->CurrentValue;
			$this->PresuEntObs2->ViewCustomAttributes = "";

			// PresuHor
			$this->PresuHor->ViewValue = $this->PresuHor->CurrentValue;
			$this->PresuHor->ViewCustomAttributes = "";

			// PresuTipoCli
			$this->PresuTipoCli->ViewValue = $this->PresuTipoCli->CurrentValue;
			$this->PresuTipoCli->ViewCustomAttributes = "";

			// PresuFechaUltimaGestion
			$this->PresuFechaUltimaGestion->ViewValue = $this->PresuFechaUltimaGestion->CurrentValue;
			$this->PresuFechaUltimaGestion->ViewValue = ew_FormatDateTime($this->PresuFechaUltimaGestion->ViewValue, 7);
			$this->PresuFechaUltimaGestion->ViewCustomAttributes = "";

			// PresuProximoContacto
			$this->PresuProximoContacto->ViewValue = $this->PresuProximoContacto->CurrentValue;
			$this->PresuProximoContacto->ViewValue = ew_FormatDateTime($this->PresuProximoContacto->ViewValue, 7);
			$this->PresuProximoContacto->ViewCustomAttributes = "";

			// PresuId
			$this->PresuId->LinkCustomAttributes = "";
			$this->PresuId->HrefValue = "";
			$this->PresuId->TooltipValue = "";

			// PresuFechaCopia
			$this->PresuFechaCopia->LinkCustomAttributes = "";
			$this->PresuFechaCopia->HrefValue = "";
			$this->PresuFechaCopia->TooltipValue = "";

			// PresuEstado
			$this->PresuEstado->LinkCustomAttributes = "";
			$this->PresuEstado->HrefValue = "";
			$this->PresuEstado->TooltipValue = "";

			// PresuFacturaPto
			$this->PresuFacturaPto->LinkCustomAttributes = "";
			$this->PresuFacturaPto->HrefValue = "";
			$this->PresuFacturaPto->TooltipValue = "";

			// PresuFacturoTipo
			$this->PresuFacturoTipo->LinkCustomAttributes = "";
			$this->PresuFacturoTipo->HrefValue = "";
			$this->PresuFacturoTipo->TooltipValue = "";

			// PresuFacturaNumero
			$this->PresuFacturaNumero->LinkCustomAttributes = "";
			$this->PresuFacturaNumero->HrefValue = "";
			$this->PresuFacturaNumero->TooltipValue = "";

			// PresuMotivo
			$this->PresuMotivo->LinkCustomAttributes = "";
			$this->PresuMotivo->HrefValue = "";
			$this->PresuMotivo->TooltipValue = "";

			// PresFechaCierre
			$this->PresFechaCierre->LinkCustomAttributes = "";
			$this->PresFechaCierre->HrefValue = "";
			$this->PresFechaCierre->TooltipValue = "";

			// PresuReemplazado
			$this->PresuReemplazado->LinkCustomAttributes = "";
			$this->PresuReemplazado->HrefValue = "";
			$this->PresuReemplazado->TooltipValue = "";

			// PresuSucursal
			$this->PresuSucursal->LinkCustomAttributes = "";
			$this->PresuSucursal->HrefValue = "";
			$this->PresuSucursal->TooltipValue = "";

			// PresuEmpresa
			$this->PresuEmpresa->LinkCustomAttributes = "";
			$this->PresuEmpresa->HrefValue = "";
			$this->PresuEmpresa->TooltipValue = "";

			// PresuTip
			$this->PresuTip->LinkCustomAttributes = "";
			$this->PresuTip->HrefValue = "";
			$this->PresuTip->TooltipValue = "";

			// PresuLet
			$this->PresuLet->LinkCustomAttributes = "";
			$this->PresuLet->HrefValue = "";
			$this->PresuLet->TooltipValue = "";

			// PresuPun
			$this->PresuPun->LinkCustomAttributes = "";
			$this->PresuPun->HrefValue = "";
			$this->PresuPun->TooltipValue = "";

			// PresuNum
			$this->PresuNum->LinkCustomAttributes = "";
			$this->PresuNum->HrefValue = "";
			$this->PresuNum->TooltipValue = "";

			// PresuCli
			$this->PresuCli->LinkCustomAttributes = "";
			$this->PresuCli->HrefValue = "";
			$this->PresuCli->TooltipValue = "";

			// PresuRaz
			$this->PresuRaz->LinkCustomAttributes = "";
			$this->PresuRaz->HrefValue = "";
			$this->PresuRaz->TooltipValue = "";

			// PresuFec1
			$this->PresuFec1->LinkCustomAttributes = "";
			$this->PresuFec1->HrefValue = "";
			$this->PresuFec1->TooltipValue = "";

			// PresuVen
			$this->PresuVen->LinkCustomAttributes = "";
			$this->PresuVen->HrefValue = "";
			$this->PresuVen->TooltipValue = "";

			// PresuTot
			$this->PresuTot->LinkCustomAttributes = "";
			$this->PresuTot->HrefValue = "";
			$this->PresuTot->TooltipValue = "";

			// PresuEntDir
			$this->PresuEntDir->LinkCustomAttributes = "";
			$this->PresuEntDir->HrefValue = "";
			$this->PresuEntDir->TooltipValue = "";

			// PresuEntLoc
			$this->PresuEntLoc->LinkCustomAttributes = "";
			$this->PresuEntLoc->HrefValue = "";
			$this->PresuEntLoc->TooltipValue = "";

			// PresuEntTel
			$this->PresuEntTel->LinkCustomAttributes = "";
			$this->PresuEntTel->HrefValue = "";
			$this->PresuEntTel->TooltipValue = "";

			// PresuEntEmail
			$this->PresuEntEmail->LinkCustomAttributes = "";
			$this->PresuEntEmail->HrefValue = "";
			$this->PresuEntEmail->TooltipValue = "";

			// PresuEntObs1
			$this->PresuEntObs1->LinkCustomAttributes = "";
			$this->PresuEntObs1->HrefValue = "";
			$this->PresuEntObs1->TooltipValue = "";

			// PresuEntObs2
			$this->PresuEntObs2->LinkCustomAttributes = "";
			$this->PresuEntObs2->HrefValue = "";
			$this->PresuEntObs2->TooltipValue = "";

			// PresuHor
			$this->PresuHor->LinkCustomAttributes = "";
			$this->PresuHor->HrefValue = "";
			$this->PresuHor->TooltipValue = "";

			// PresuTipoCli
			$this->PresuTipoCli->LinkCustomAttributes = "";
			$this->PresuTipoCli->HrefValue = "";
			$this->PresuTipoCli->TooltipValue = "";

			// PresuFechaUltimaGestion
			$this->PresuFechaUltimaGestion->LinkCustomAttributes = "";
			$this->PresuFechaUltimaGestion->HrefValue = "";
			$this->PresuFechaUltimaGestion->TooltipValue = "";

			// PresuProximoContacto
			$this->PresuProximoContacto->LinkCustomAttributes = "";
			$this->PresuProximoContacto->HrefValue = "";
			$this->PresuProximoContacto->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$this->Row_Rendered();
	}

	// Set up Breadcrumb
	function SetupBreadcrumb() {
		global $Breadcrumb, $Language;
		$Breadcrumb = new cBreadcrumb();
		$Breadcrumb->Add("list", $this->TableVar, "presu_presupuestoslist.php", $this->TableVar, TRUE);
		$PageId = "view";
		$Breadcrumb->Add("view", $PageId, ew_CurrentUrl());
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	// $type = ''|'success'|'failure'|'warning'
	function Message_Showing(&$msg, $type) {
		if ($type == 'success') {

			//$msg = "your success message";
		} elseif ($type == 'failure') {

			//$msg = "your failure message";
		} elseif ($type == 'warning') {

			//$msg = "your warning message";
		} else {

			//$msg = "your message";
		}
	}

	// Page Render event
	function Page_Render() {

		//echo "Page Render";
	}

	// Page Data Rendering event
	function Page_DataRendering(&$header) {

		// Example:
		//$header = "your header";

	}

	// Page Data Rendered event
	function Page_DataRendered(&$footer) {

		// Example:
		//$footer = "your footer";

	}
}
?>
<?php ew_Header(FALSE) ?>
<?php

// Create page object
if (!isset($presu_presupuestos_view)) $presu_presupuestos_view = new cpresu_presupuestos_view();

// Page init
$presu_presupuestos_view->Page_Init();

// Page main
$presu_presupuestos_view->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$presu_presupuestos_view->Page_Render();
?>
<?php include_once "header.php" ?>
<script type="text/javascript">

// Page object
var presu_presupuestos_view = new ew_Page("presu_presupuestos_view");
presu_presupuestos_view.PageID = "view"; // Page ID
var EW_PAGE_ID = presu_presupuestos_view.PageID; // For backward compatibility

// Form object
var fpresu_presupuestosview = new ew_Form("fpresu_presupuestosview");

// Form_CustomValidate event
fpresu_presupuestosview.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fpresu_presupuestosview.ValidateRequired = true;
<?php } else { ?>
fpresu_presupuestosview.ValidateRequired = false; 
<?php } ?>

// Dynamic selection lists
// Form object for search

</script>
<script type="text/javascript">

// Write your client script here, no need to add script tags.
</script>
<?php $Breadcrumb->Render(); ?>
<div class="ewViewExportOptions">
<?php $presu_presupuestos_view->ExportOptions->Render("body") ?>
<?php if (!$presu_presupuestos_view->ExportOptions->UseDropDownButton) { ?>
</div>
<div class="ewViewOtherOptions">
<?php } ?>
<?php
	foreach ($presu_presupuestos_view->OtherOptions as &$option)
		$option->Render("body");
?>
</div>
<?php $presu_presupuestos_view->ShowPageHeader(); ?>
<?php
$presu_presupuestos_view->ShowMessage();
?>
<form name="fpresu_presupuestosview" id="fpresu_presupuestosview" class="ewForm form-inline" action="<?php echo ew_CurrentPage() ?>" method="post">
<input type="hidden" name="t" value="presu_presupuestos">
<table class="ewGrid"><tr><td>
<table id="tbl_presu_presupuestosview" class="table table-bordered table-striped">
<?php if ($presu_presupuestos->PresuId->Visible) { // PresuId ?>
	<tr id="r_PresuId">
		<td><span id="elh_presu_presupuestos_PresuId"><?php echo $presu_presupuestos->PresuId->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuId->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuId" class="control-group">
<span<?php echo $presu_presupuestos->PresuId->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuId->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuFechaCopia->Visible) { // PresuFechaCopia ?>
	<tr id="r_PresuFechaCopia">
		<td><span id="elh_presu_presupuestos_PresuFechaCopia"><?php echo $presu_presupuestos->PresuFechaCopia->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuFechaCopia->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuFechaCopia" class="control-group">
<span<?php echo $presu_presupuestos->PresuFechaCopia->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuFechaCopia->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEstado->Visible) { // PresuEstado ?>
	<tr id="r_PresuEstado">
		<td><span id="elh_presu_presupuestos_PresuEstado"><?php echo $presu_presupuestos->PresuEstado->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEstado->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEstado" class="control-group">
<span<?php echo $presu_presupuestos->PresuEstado->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEstado->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuFacturaPto->Visible) { // PresuFacturaPto ?>
	<tr id="r_PresuFacturaPto">
		<td><span id="elh_presu_presupuestos_PresuFacturaPto"><?php echo $presu_presupuestos->PresuFacturaPto->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuFacturaPto->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuFacturaPto" class="control-group">
<span<?php echo $presu_presupuestos->PresuFacturaPto->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuFacturaPto->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuFacturoTipo->Visible) { // PresuFacturoTipo ?>
	<tr id="r_PresuFacturoTipo">
		<td><span id="elh_presu_presupuestos_PresuFacturoTipo"><?php echo $presu_presupuestos->PresuFacturoTipo->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuFacturoTipo->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuFacturoTipo" class="control-group">
<span<?php echo $presu_presupuestos->PresuFacturoTipo->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuFacturoTipo->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuFacturaNumero->Visible) { // PresuFacturaNumero ?>
	<tr id="r_PresuFacturaNumero">
		<td><span id="elh_presu_presupuestos_PresuFacturaNumero"><?php echo $presu_presupuestos->PresuFacturaNumero->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuFacturaNumero->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuFacturaNumero" class="control-group">
<span<?php echo $presu_presupuestos->PresuFacturaNumero->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuFacturaNumero->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuMotivo->Visible) { // PresuMotivo ?>
	<tr id="r_PresuMotivo">
		<td><span id="elh_presu_presupuestos_PresuMotivo"><?php echo $presu_presupuestos->PresuMotivo->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuMotivo->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuMotivo" class="control-group">
<span<?php echo $presu_presupuestos->PresuMotivo->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuMotivo->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresFechaCierre->Visible) { // PresFechaCierre ?>
	<tr id="r_PresFechaCierre">
		<td><span id="elh_presu_presupuestos_PresFechaCierre"><?php echo $presu_presupuestos->PresFechaCierre->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresFechaCierre->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresFechaCierre" class="control-group">
<span<?php echo $presu_presupuestos->PresFechaCierre->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresFechaCierre->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuReemplazado->Visible) { // PresuReemplazado ?>
	<tr id="r_PresuReemplazado">
		<td><span id="elh_presu_presupuestos_PresuReemplazado"><?php echo $presu_presupuestos->PresuReemplazado->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuReemplazado->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuReemplazado" class="control-group">
<span<?php echo $presu_presupuestos->PresuReemplazado->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuReemplazado->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuSucursal->Visible) { // PresuSucursal ?>
	<tr id="r_PresuSucursal">
		<td><span id="elh_presu_presupuestos_PresuSucursal"><?php echo $presu_presupuestos->PresuSucursal->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuSucursal->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuSucursal" class="control-group">
<span<?php echo $presu_presupuestos->PresuSucursal->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuSucursal->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEmpresa->Visible) { // PresuEmpresa ?>
	<tr id="r_PresuEmpresa">
		<td><span id="elh_presu_presupuestos_PresuEmpresa"><?php echo $presu_presupuestos->PresuEmpresa->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEmpresa->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEmpresa" class="control-group">
<span<?php echo $presu_presupuestos->PresuEmpresa->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEmpresa->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuTip->Visible) { // PresuTip ?>
	<tr id="r_PresuTip">
		<td><span id="elh_presu_presupuestos_PresuTip"><?php echo $presu_presupuestos->PresuTip->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuTip->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuTip" class="control-group">
<span<?php echo $presu_presupuestos->PresuTip->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuTip->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuLet->Visible) { // PresuLet ?>
	<tr id="r_PresuLet">
		<td><span id="elh_presu_presupuestos_PresuLet"><?php echo $presu_presupuestos->PresuLet->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuLet->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuLet" class="control-group">
<span<?php echo $presu_presupuestos->PresuLet->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuLet->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuPun->Visible) { // PresuPun ?>
	<tr id="r_PresuPun">
		<td><span id="elh_presu_presupuestos_PresuPun"><?php echo $presu_presupuestos->PresuPun->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuPun->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuPun" class="control-group">
<span<?php echo $presu_presupuestos->PresuPun->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuPun->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuNum->Visible) { // PresuNum ?>
	<tr id="r_PresuNum">
		<td><span id="elh_presu_presupuestos_PresuNum"><?php echo $presu_presupuestos->PresuNum->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuNum->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuNum" class="control-group">
<span<?php echo $presu_presupuestos->PresuNum->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuNum->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuCli->Visible) { // PresuCli ?>
	<tr id="r_PresuCli">
		<td><span id="elh_presu_presupuestos_PresuCli"><?php echo $presu_presupuestos->PresuCli->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuCli->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuCli" class="control-group">
<span<?php echo $presu_presupuestos->PresuCli->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuCli->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuRaz->Visible) { // PresuRaz ?>
	<tr id="r_PresuRaz">
		<td><span id="elh_presu_presupuestos_PresuRaz"><?php echo $presu_presupuestos->PresuRaz->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuRaz->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuRaz" class="control-group">
<span<?php echo $presu_presupuestos->PresuRaz->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuRaz->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuFec1->Visible) { // PresuFec1 ?>
	<tr id="r_PresuFec1">
		<td><span id="elh_presu_presupuestos_PresuFec1"><?php echo $presu_presupuestos->PresuFec1->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuFec1->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuFec1" class="control-group">
<span<?php echo $presu_presupuestos->PresuFec1->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuFec1->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuVen->Visible) { // PresuVen ?>
	<tr id="r_PresuVen">
		<td><span id="elh_presu_presupuestos_PresuVen"><?php echo $presu_presupuestos->PresuVen->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuVen->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuVen" class="control-group">
<span<?php echo $presu_presupuestos->PresuVen->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuVen->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuTot->Visible) { // PresuTot ?>
	<tr id="r_PresuTot">
		<td><span id="elh_presu_presupuestos_PresuTot"><?php echo $presu_presupuestos->PresuTot->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuTot->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuTot" class="control-group">
<span<?php echo $presu_presupuestos->PresuTot->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuTot->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEntDir->Visible) { // PresuEntDir ?>
	<tr id="r_PresuEntDir">
		<td><span id="elh_presu_presupuestos_PresuEntDir"><?php echo $presu_presupuestos->PresuEntDir->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEntDir->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEntDir" class="control-group">
<span<?php echo $presu_presupuestos->PresuEntDir->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEntDir->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEntLoc->Visible) { // PresuEntLoc ?>
	<tr id="r_PresuEntLoc">
		<td><span id="elh_presu_presupuestos_PresuEntLoc"><?php echo $presu_presupuestos->PresuEntLoc->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEntLoc->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEntLoc" class="control-group">
<span<?php echo $presu_presupuestos->PresuEntLoc->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEntLoc->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEntTel->Visible) { // PresuEntTel ?>
	<tr id="r_PresuEntTel">
		<td><span id="elh_presu_presupuestos_PresuEntTel"><?php echo $presu_presupuestos->PresuEntTel->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEntTel->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEntTel" class="control-group">
<span<?php echo $presu_presupuestos->PresuEntTel->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEntTel->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEntEmail->Visible) { // PresuEntEmail ?>
	<tr id="r_PresuEntEmail">
		<td><span id="elh_presu_presupuestos_PresuEntEmail"><?php echo $presu_presupuestos->PresuEntEmail->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEntEmail->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEntEmail" class="control-group">
<span<?php echo $presu_presupuestos->PresuEntEmail->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEntEmail->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEntObs1->Visible) { // PresuEntObs1 ?>
	<tr id="r_PresuEntObs1">
		<td><span id="elh_presu_presupuestos_PresuEntObs1"><?php echo $presu_presupuestos->PresuEntObs1->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEntObs1->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEntObs1" class="control-group">
<span<?php echo $presu_presupuestos->PresuEntObs1->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEntObs1->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuEntObs2->Visible) { // PresuEntObs2 ?>
	<tr id="r_PresuEntObs2">
		<td><span id="elh_presu_presupuestos_PresuEntObs2"><?php echo $presu_presupuestos->PresuEntObs2->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuEntObs2->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuEntObs2" class="control-group">
<span<?php echo $presu_presupuestos->PresuEntObs2->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuEntObs2->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuHor->Visible) { // PresuHor ?>
	<tr id="r_PresuHor">
		<td><span id="elh_presu_presupuestos_PresuHor"><?php echo $presu_presupuestos->PresuHor->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuHor->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuHor" class="control-group">
<span<?php echo $presu_presupuestos->PresuHor->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuHor->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuTipoCli->Visible) { // PresuTipoCli ?>
	<tr id="r_PresuTipoCli">
		<td><span id="elh_presu_presupuestos_PresuTipoCli"><?php echo $presu_presupuestos->PresuTipoCli->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuTipoCli->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuTipoCli" class="control-group">
<span<?php echo $presu_presupuestos->PresuTipoCli->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuTipoCli->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuFechaUltimaGestion->Visible) { // PresuFechaUltimaGestion ?>
	<tr id="r_PresuFechaUltimaGestion">
		<td><span id="elh_presu_presupuestos_PresuFechaUltimaGestion"><?php echo $presu_presupuestos->PresuFechaUltimaGestion->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuFechaUltimaGestion->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuFechaUltimaGestion" class="control-group">
<span<?php echo $presu_presupuestos->PresuFechaUltimaGestion->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuFechaUltimaGestion->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($presu_presupuestos->PresuProximoContacto->Visible) { // PresuProximoContacto ?>
	<tr id="r_PresuProximoContacto">
		<td><span id="elh_presu_presupuestos_PresuProximoContacto"><?php echo $presu_presupuestos->PresuProximoContacto->FldCaption() ?></span></td>
		<td<?php echo $presu_presupuestos->PresuProximoContacto->CellAttributes() ?>>
<span id="el_presu_presupuestos_PresuProximoContacto" class="control-group">
<span<?php echo $presu_presupuestos->PresuProximoContacto->ViewAttributes() ?>>
<?php echo $presu_presupuestos->PresuProximoContacto->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
</table>
</td></tr></table>
</form>
<script type="text/javascript">
fpresu_presupuestosview.Init();
</script>
<?php
$presu_presupuestos_view->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<script type="text/javascript">

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php include_once "footer.php" ?>
<?php
$presu_presupuestos_view->Page_Terminate();
?>
